package com.hermes.android.netengine_clinet;

import android.support.v7.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    // Used to load the 'native-lib' library on application startup.
    static {
        System.loadLibrary("netclient-lib");
        System.loadLibrary("avcodec-57");
        System.loadLibrary("avdevice-57");
        System.loadLibrary("avfilter-6");
        System.loadLibrary("avformat-57");
        System.loadLibrary("avutil-55");
        System.loadLibrary("swresample-2");
        System.loadLibrary("swscale-4");
    }

    /**
     * A native method that is implemented by the 'native-lib' native library,
     * which is packaged with this application.
     */
    public native String stringFromJNI();
    public native long libClientInit(String strAddr, int nPort);
    public native int lib3DCreate(long xhNet,long xhToken,String strJsonMsg);
    public native int libGetSocket(long xhNet,boolean bIsCall);
    public native byte[] libRecvMsg(long xhNet, byte st_JArray[], Integer pHdr_Type, Integer pHdr_Code, Integer pInt_Len, boolean bIsBlock);
    public native int libSendMsg(long xhNet,long xhToken,int unOperatorType,int unOperatorCode,byte st_JArray[],int nLen);
    public native int libClose(long xhNet);

    public native int libAvDecodecInit(int nWidth,int nHigh);
    public native byte[] libAvDecodecData(byte data[], int len);
    public native int libAvDecodecDataTest();
    public native int libAvDecodecDestroy();
}

